from typing import Optional

from sqlalchemy import Date, Integer
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column
import datetime

class Base(DeclarativeBase):
    pass


class Lotterybase(Base):
    __tablename__ = 'lotterybase'

    date: Mapped[datetime.date] = mapped_column(Date)
    red1: Mapped[int] = mapped_column(Integer)
    red2: Mapped[int] = mapped_column(Integer)
    red3: Mapped[int] = mapped_column(Integer)
    red4: Mapped[int] = mapped_column(Integer)
    red5: Mapped[int] = mapped_column(Integer)
    red6: Mapped[int] = mapped_column(Integer)
    blue: Mapped[int] = mapped_column(Integer)
    volume: Mapped[Optional[int]] = mapped_column(Integer, primary_key=True)
